<?php /* Smarty version Smarty-3.1.18, created on 2017-05-24 15:11:50
         compiled from "/data/www/mystery/protected/modules/webadmin/views/question/attachment.tpl" */ ?>
<?php /*%%SmartyHeaderCode:1500015316550561ff3cae96-01316707%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'ffeb7b323a82b422b9366c19cf316c94a6348a6b' => 
    array (
      0 => '/data/www/mystery/protected/modules/webadmin/views/question/attachment.tpl',
      1 => 1494904924,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1500015316550561ff3cae96-01316707',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.18',
  'unifunc' => 'content_550561ff3f9020_88871282',
  'variables' => 
  array (
    'list' => 0,
    'val' => 0,
    'page' => 0,
    'project_info' => 0,
    'question_id' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_550561ff3f9020_88871282')) {function content_550561ff3f9020_88871282($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("../common/iframe_header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<link href="/css/uploadify.css" rel="stylesheet">
<div class="pad_10" style="margin-top: 40px;">
    <div class="table-list">
        <div class="common-form">
            <input type="file" name="upfile" id="uploadify"/>
            <div>
                请选择zip文件包，包内文件为所有网点此问卷下题目对标的附件，包内文件名格式为<br/><b>网点编号-题目编号-题目序号</b><br/>
                在线播放支持格式如下：图片jpg,jpeg,png,gif 音频视频mp3,wav,m4a,ogg,mp4,flv,fla
            </div>
        </form>
        </div>
    </div>
    <br/>
    <div class="table-list">
        <table width="100%">
        <thead>
            <tr>
                    <th>ZIP文件名</th>
                    <th>更新时间</th>
                    <th>处理结果</th>
                    <th>状态</th>
            </tr>
        </thead>
        <tbody>
            <?php  $_smarty_tpl->tpl_vars['val'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['val']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['list']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['val']->key => $_smarty_tpl->tpl_vars['val']->value) {
$_smarty_tpl->tpl_vars['val']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['val']->key;
?>
            <tr onMouseOver="this.className = 'tr2'" onMouseOut="this.className = 'tr1'" class="tr1" id="question_<?php echo $_smarty_tpl->tpl_vars['val']->value['question_id'];?>
">
                    <td><?php echo $_smarty_tpl->tpl_vars['val']->value['zip_name'];?>
</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['val']->value['update_time'];?>
</td>
                    <td><?php echo msubstr($_smarty_tpl->tpl_vars['val']->value['remark'],30);?>
</td>
                    <td><?php if ($_smarty_tpl->tpl_vars['val']->value['is_dispose']==1) {?>未处理<?php } else { ?>已处理<?php }?></td>
            </tr>
            <?php } ?>
        </tbody>
        </table>

        <div style="float:right;"><?php echo $_smarty_tpl->tpl_vars['page']->value;?>
</div>
    </DIV>
</div>

   
<script src="/js/jquery.uploadify.min.js"></script>
<script type="text/javascript">
var project_email = "超大文件上传请联系项目邮箱<?php echo $_smarty_tpl->tpl_vars['project_info']->value['email'];?>
,或者拆分多个文件上传";
    $('#uploadify').uploadify({
        //'debug': true,
		'fileSizeLimit' : '500MB',
        'formData'      : {'question_id' : '<?php echo $_smarty_tpl->tpl_vars['question_id']->value;?>
','project_id':'<?php echo $_smarty_tpl->tpl_vars['project_info']->value['project_id'];?>
','bank_id':'<?php echo $_smarty_tpl->tpl_vars['project_info']->value['bank_id'];?>
'},
        'buttonText' : '请选择ZIP文件',
        'fileObjName' : 'upfile',   
        'swf'      : '/js/uploadify.swf',
        'fileTypeExts' : '*.zip',
        'uploader' : '/webadmin/attach/zip',
        'onUploadSuccess' : function(file, data, response) {
            var obj = eval('(' + data + ')');
            if (obj.state =='SUCCESS'){
                alert('上传成功');
                window.parent.location.reload();
            } else {
                alert(obj.error);
            }
        } 
    });
    
</script>
<?php echo $_smarty_tpl->getSubTemplate ("../common/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<?php }} ?>
